<template>
	<section class="archive">
		<div class="box" v-for="(item, index) in archiveClass.list.value" :key="index">
			<h5>{{ item.date }}</h5>
			<div v-for="val in item.result" :key="val.id">
				<div class="details">
					<img width="100px" height="50px" :src="`${'http://ikun-pro-ui.fun:3000/static/'}${val.img}`" class="avatar" />
					<section class="info-box">
						<span class="info-title" @click="archiveClass.todetails(val.id)">{{ val.title }}</span>
						<div class="info-date">
							<el-icon><Calendar /></el-icon>{{ val.createdAt.slice(0, 10) }}
						</div>
					</section>
				</div>
			</div>
		</div>
	</section>
</template>
<script lang="ts" setup>
import { Calendar } from '@element-plus/icons-vue'
import { ArchiveClass } from './controller'
let archiveClass = new ArchiveClass()
</script>
<style lang="scss" src="./index.scss"></style>
